package com.test.activiti.activiti.controller;

import com.test.activiti.activiti.service.RuTaskService;
import com.test.activiti.activiti.vo.PageResponse;
import com.test.activiti.activiti.vo.TaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author dzf62
 * @Description TODO
 * @Date 2023/8/29 18:41
 * @Version 1.0
 */
@RequestMapping("tasks")
@RestController
public class TaskController {
    @Autowired
    RuTaskService taskService;

    @GetMapping("taskList")
    public PageResponse<TaskVO> taskList(@RequestParam(value = "page", defaultValue = "1", required = false) Integer page,
                                         @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize){
        PageResponse<TaskVO> pageResponse = taskService.taskList(page, pageSize);
        return pageResponse;
    }

    //todo:任务办理
}
